﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace DrugStore.Models
{
    public class AccountModels
    {
    }

    public class AccountBusiness 
    {
        public Admin GetAccountByUserName(string username)
        {
            DrugStoreEntities entities = new DrugStoreEntities();
            username = HttpUtility.HtmlEncode(username);
            return entities.Admins.FirstOrDefault(a => a.Name == username);
        }
    }
}